package by.dvrudenko.avtobaza.webapp.utils.renderer;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import by.dvrudenko.avtobaza.datamodel.Car;
import by.dvrudenko.avtobaza.datamodel.City;

public class CarChoiseRenderer implements IChoiceRenderer<Car> {

	public static CarChoiseRenderer INSTANCE = new CarChoiseRenderer();

	private CarChoiseRenderer() {
		super();
	}

	@Override
	public Object getDisplayValue(Car car) {
		return car.getCarType().getBrand() +"" +  car.getCarType().getModel() +" "  + car.getCarryingCapacity()+" " + car.getVolumeCapacity();
	}

	@Override
	public String getIdValue(Car car, int index) {
		return car.getId().toString();
	}

}
